import * as http from '@/utils/http'

export function bindPhone (phone) {
  return http.put('/v1/users/bind', {phone: phone})
}

export function myCourses () {
  return http.get('/v1/user-courses')
}

export function myTextbook () {
  return http.get('/v1/user-textbook')
}

export function updateUser (params) {
  return http.put('/v1/users', params)
}

export function getTeam (referId) {
  return http.get('/v1/team/' + referId)
}

export function userInfo () {
  return http.get('/v1/users')
}

export function getRefer () {
  return http.get('/v1/users/refer')
}

export function getJiaocaiCatalog (id) {
  return http.get('v1/textbook-catalog/' + id)
}

export function getJiaocaiCatalogMenu (id, param) {
  return http.get('v1/textbookCatalog/' + id, param)
}
